package com.fr.report.io;

import com.fr.base.FRContext;
import com.fr.base.dav.Env;
import com.fr.base.dav.LocalEnv;
import com.fr.report.ResultWorkBook;
import java.util.Map;

public class DefaultResultSaver
  implements ResultSaver
{
  private static DefaultResultSaver SC = new DefaultResultSaver();

  public static DefaultResultSaver getInstance()
  {
    return SC;
  }

  public void save(ResultWorkBook paramResultWorkBook, String paramString, Map paramMap)
    throws Exception
  {
    Env localEnv = FRContext.getCurrentEnv();
    if (localEnv instanceof LocalEnv)
    {
      ((LocalEnv)localEnv).writeResult(paramResultWorkBook, paramString + ".xml");
      return;
    }
    throw new UnsupportedOperationException();
  }
}